<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var num = 10;
        var age = ++num;
        console.log(++num);
        console.log(age);
        // ++num就是无论如何num都加1了
        var a = 20;
        var b = a++;
        console.log(b);
        console.log(b);
    </script>
</head>

<body>

</body>

</html>